<?php
class CategoryModel extends Model{
	private $table1 = 'categories';
	private $table2 = 'categories_description';
	
	/**
	 * 按照指定条件获取全部分类列表
	 * @param array $where 条件  string $order 排序  string $limit
	 * @return array
	 */
	public function getCateList($where,$order){
		return M($this->table1." c")->join($this->table2.' cd ON c.categories_id=cd.categories_id')->where($where)->order($order)
		->field('c.categories_id,cd.categories_name')->select();
		 //M($this->table1." p")->getLastSql();
	}
}